# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-ward
pkgver=0.67.0b0
pkgrel=1
pkgdesc="Modern test framework for Python"
url="https://ward.readthedocs.io/"
arch="noarch"
license="MIT"
depends="
	py3-click
	py3-click-completion
	py3-click-default-group
	py3-cucumber-tag-expressions
	py3-pluggy
	py3-pprintpp
	py3-rich
	py3-tomli
	"
makedepends="
	poetry
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-pytest
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/darrenburns/ward/archive/refs/tags/release/$pkgver.tar.gz"
options="!check" # Pytest fails to find fixture "description"
builddir="$srcdir/ward-release-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest --ignore tests/resources
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
c94106da8123ec5a2aa32fc68c09ab14179c0226245c467755736b9c069d287326398ef95ba609c57468e5fb5d61dedbfcc6a18db351e556cd0914f6b8d5e5f6  py3-ward-0.67.0b0.tar.gz
"
